<?php
/* @var $this ProductController */
/* @var $model Product */
/* @var $form CActiveForm */
$baseUrl = Yii::app()->request->baseUrl;
$cs = Yii::app()->getClientScript();
?>

<div class="widget-container">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'authitem-form',
        'htmlOptions' => array(
            'enctype' => 'multipart/form-data',
            'class' => 'form-horizontal'
        ),
            ));
    ?>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'name', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php
            if ($model->getScenario() != 'update')
            echo $form->textField($model, 'name', array('class' => 'span5'));
        else 
            echo $form->textField($model, 'name', array('class' => 'span5','disabled'=>'disabled'));
            ?>
            <?php echo $form->error($model, 'name'); ?>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'type', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo CHtml::activeDropDownList($model, 'type', Authitem::select()); ?>
            <?php echo $form->error($model, 'type'); ?>
        </div>
    </div>


    <div class="control-group">
        <?php echo $form->labelEx($model, 'description', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textField($model, 'description', array('class' => 'span5')); ?>
            <?php echo $form->error($model, 'description'); ?>
        </div>
    </div>


    <div class="control-group">
        <?php echo $form->labelEx($model, 'bizrule', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textField($model, 'bizrule', array('class' => 'span5')); ?>
            <?php echo $form->error($model, 'bizrule'); ?>
        </div>
    </div>


<div class="control-group">
        <?php echo $form->labelEx($model, 'data', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textField($model, 'data', array('class' => 'span5')); ?>
            <?php echo $form->error($model, 'data'); ?>
        </div>
    </div>
    <div class="form-actions">
        <?php echo CHtml::submitButton($model->isNewRecord ? 'Thêm' : 'Lưu', array('class' => 'btn btn-success')); ?>

    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->
